import { users } from '@prisma/client';
import { formatDate } from './format';

export const userToClient = (user: users) => ({
  id: user.id.toString(),
  username: user.username,
  email: user.email,
  phone: user.phone,
  avatar: user.avatar,
  bio: user.bio,
  status: user.status,
  created_at: formatDate(user.created_at),
  updated_at: formatDate(user.updated_at),
  last_login: formatDate(user.last_login)
});
